package com.example.domain.dto.pricelist;

import com.example.domain.entity.enums.PriceListStatus;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 更新价目表请求DTO
 * 所有字段均为可选，只更新提供的字段
 * 
 * @author Means
 * @since 2025-10-27
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UpdatePriceListRequest {
    
    /**
     * 价目表名称
     */
    @Size(max = 100, message = "价目表名称长度不能超过100个字符")
    private String name;
    
    /**
     * 生效开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime effectiveFrom;
    
    /**
     * 生效结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime effectiveTo;
    
    /**
     * 状态
     */
    private PriceListStatus status;
}

